package com.efruit.authority;

public class AuthorityProxy {
	private IUserInfoFetcher userInfoFetcher = null;

	public AuthorityProxy() {
//		AuthorityFactory factory = AuthorityFactory.getDAOFactory();
//		userInfoFetcher = factory.getUserInfoFetcher();
	}

	protected IUserInfo login(String username, String password) {
		if(userInfoFetcher == null){
			AuthorityFactory factory = AuthorityFactory.getDAOFactory();
			userInfoFetcher = factory.getUserInfoFetcher();
		}
		IUserInfo userInfo = userInfoFetcher.getUserInfo(username, password);
		return userInfo;
	}
}
